<?php
#清空购物车
session_start();
if(isset($_SESSION['car'])){
    $_SESSION['car'] = array();
    echo "<script>alert('清空购物车成功');location.href='shoppingCar.php';</script>";
}else{
    echo "<script>alert('您还未购物');location.href='type2.php';</script>";
}